package com.can.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.can.pojo.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface EmployeeMapper extends BaseMapper<Employee> {
    List<Employee> getAll(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select * from tbl_employee ${ew.customSqlSegment}")
    List<Employee> getEmployeeAll(@Param(Constants.WRAPPER) Wrapper wrapper);

    /**
     * 分页查询
     * @param page
     * @return
     */
    IPage<Employee> findEmployeeByPage(Page page);
}
